<template>
    <div>
        <h2>TsShop</h2>
        {{ title }}
        <button @click="title = 'hi shop'">setTitle</button>
    </div>
</template>
<script setup>
import { onDeactivated, onActivated, inject } from 'vue';

const title = inject('title')

onDeactivated(() => {
    console.log('onDeactivated');
})
onActivated(() => {
    console.log('onActivated');
})
</script>